/*
链接数据库

*/
const mongoose =require('mongoose')
mongoose.connect('mongodb://localhost/FYF',{ //连接FYF数据库
    useNewUrlParser:true,
    useUnifiedTopology:true
})
const db=mongoose.connection
db.on('error',console.error.bind(console,'connection error:'))
db.once('open',function(){
    console.log('mongodb连接上了')
})

